Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Modify  Terminal  Service  Permissions  

 Content of Modify Terminal Service Permissions.vbs
MD5 Hash: EEE194B13CF0F61A88503B8A57B0F2A3
' Description: Gives the user fabrikam\bob the right to connect to another Terminal Services session.


CONST WINSTATION_CONNECT = 8

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery _
("Select * from Win32_TSAccount Where AccountName = 'fabrikam\\bob' " & _
"AND TerminalName = 'Accounting'")

For Each objItem in colItems
errResult = objItem.ModifyPermissions(WINSTATION_CONNECT,True)
Next

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a